<template>
  <div class="shop-content flex-j-sb flex-a-c " :class="usClass ? 'shopListUs' : ''">
    <div class="address" @click.stop="storeNavigation(storeItem.id)">
      <div class="store-name ell">{{ storeItem.store_name }}</div>
      <div class="address-details">{{ address }}</div>
      <div class="location flex-a-c">
        <img src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/location.png" />
        <span class="distance">距您{{ storeItem.distance | kmUnit }} </span>
        <div class="navigation flex-a-c" @click.stop="navigation(storeItem.latitude, storeItem.longitude, storeItem.store_name)">
          <div>导航</div>
          <span class="iconfont icon-advertise-next"></span>
        </div>
        <slot name="merchant"></slot>
      </div>
    </div>
    <div class="mobile" v-if="isImg" @click.stop="callStore(storeItem.store_mobile)">
      <img src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/consumption-coupons/mobile.png" />
    </div>
  </div>
</template>
<script>
import addressUs_controller from "./addressUs_controller.js";
export default addressUs_controller;
</script>
<style scoped>
.purchase-content ::v-deep .van-collapse-item__content {
  background-color: #f8f8f8;
}

.purchase-content ::v-deep .van-collapse-item {
  background-color: #f8f8f8;
}
</style>
<style lang="scss" scoped>
/* 门店不同的样式 */

.ell {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  /* 定义显示的行数 */
  overflow: hidden;
}

.shopListUs {
  padding: 0.8438rem 0.75rem 0.8125rem 0.7813rem;
}

.shop-content {
  width: 100%;
  background-color: #fff;

  .location img {
    width: 0.5625rem;
    height: 0.6875rem;
    margin: 0 0.4375rem 0 0;
  }
}

.location img {
  width: 0.5625rem;
  height: 0.6875rem;
  margin: 0 0.4375rem 0 0;
}

.shop-content .mobile {
  width: 1.875rem;
  height: 1.875rem;

  img {
    width: 1.875rem;
    height: 1.875rem;
  }
}

.address {
  // width: 100%;
  .store-name {
    font-size: 0.9375rem;
    color: #222;
    margin: 0 0 0.4688rem 0;
    text-align: left;
  }

  .address-details {
    font-size: 0.8125rem;
    color: #222;
    margin: 0 0 0.4688rem 0;
    text-align: left;
  }
}

.location {
  .distance {
    font-size: 0.75rem;
    color: #555;
    margin: 0 0.875rem 0 0;
  }

  .navigation {
    font-size: 0.75rem;
    color: #ff3a00;
  }
}
</style>
